// Copyright (C) 2016 All rights reserved.
// Author: liufeng11@letv.com (Liu Feng)
// Description:
#ifndef _HOGFONTFEATUREEXTRACTOR_H
#define _HOGFONTFEATUREEXTRACTOR_H

#include "FontFeatureExtractor.h"
#include <cmath>

#define PI 3.1415927

class HogFontFeatureExtractor : public FontFeatureExtractor {
public:
  virtual void ExtractFeature(const unsigned char* data, std::vector<double>* feature);
private:
  template<class T>
  inline T& P(T* data, int i, int j) {
    return data[i*COLS+j];
  }

  void ExtractHogFeature(const double* Ix, const double* Iy, int rows, int cols, int scale, std::vector<double>* v);
};

#endif //HOGFONTFEATUREEXTRACTOR_H
